﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace VisionCloud.Core.Model
{
    public class CreateEntity
    {
        [Required]
        [Column(TypeName = "uuid", Order = 1000)]
        public Guid CreatedBy { get; set; }

        [Required]
        [Column(TypeName = "timestamp(0)", Order = 1001)]
        public DateTime CreatedDate { get; set; }
    }

    public class BaseEntity
    {
        /// <summary>
        /// 是否已删除
        /// </summary>
        [Required]
        [Column(TypeName = "bool", Order = 999)]
        public bool IsDeleted { get; set; }

        /// <summary>
        /// 创建者
        /// </summary>
        [Column(TypeName = "uuid", Order = 1000)]
        public Guid CreatedBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column(TypeName = "timestamp(0)", Order = 1001)]
        public DateTime CreatedDate { get; set; }

        /// <summary>
        /// 最后更新者
        /// </summary>
        [Column(TypeName = "uuid", Order = 1002)]
        public Guid LastUpdatedBy { get; set; }

        /// <summary>
        /// 最后更新时间
        /// </summary>
        [Column(TypeName = "timestamp(0)", Order = 1003)]
        public DateTime LastUpdatedDate { get; set; }
    }

    public class BaseEntityYun
    {
        [Required]
        [Column(TypeName = "bool", Order = 999)]
        public bool IsDeleted { get; set; }

        [Column(TypeName = "uuid", Order = 1000)]
        public Guid CreateUserGuid { get; set; }

        [Column(TypeName = "timestamp(0)", Order = 1001)]
        public DateTime CreateDateTime { get; set; }

        [Column(TypeName = "uuid", Order = 1002)]
        public Guid UpdateUserGuid { get; set; }

        [Column(TypeName = "timestamp(0)", Order = 1003)]
        public DateTime UpdateDateTime { get; set; }
    }
}